package cn.wolfcode.mapper;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.query.EmployeeQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    void delete(Long id);

    void insert(Employee employee);

    Employee get(Long id);

    List<Employee> selectAll();

    void update(Employee employee);

    List<Employee> selectForList(EmployeeQueryObject qo);

	void insertRelation(@Param("employeeId") Long employeeId, @Param("roleId") Long roleId);

    void deleteRelation(Long employeeId);

	Employee login(@Param("username") String username, @Param("password") String password);

	Employee selectByUsernameAndId(@Param("username") String username,@Param("id") Long id);

	List<String> selectByEmployeeIdForEXPRESSION(Long id);

	void updatePassword(@Param("id") Long id, @Param("newPassword") String newPassword);

	void updateStatus(@Param("id") Long id);

	void batchDelete(@Param("ids") Long[] ids);

	List<Employee> selectByRoleSn(@Param("sns") String[] sns);
}